<template>
  <div>
    <input type="text" v-model="obj.name">
    <input type="text" v-model.number="obj.age">
  </div>
</template>

<script>
export default {
  data() {
    return {
      obj: {
        name: '黄伟康',
        age: 6
      }
    }
  },
  watch: {
    obj: {
      deep: true, //深度监听复杂类型的变化
      handler (a) {
        console.log(a)
      }
    }
  }
}
</script>

<style>

</style>